/*
 * LandienBean.java
 *
 * Created on 11 avril 2007, 18:43
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Session;

import Entity.Industrie;
import Entity.Land;
import Entity.Landien;
import java.util.Collection;
import java.util.Vector;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author geoffroy
 */
@Stateless(mappedName="LANDIEN2")
public class LandienBean implements LandienRemote
{
    
    @PersistenceContext
    private EntityManager em;
    
    /** Creates a new instance of LandienBean */
    public LandienBean()
    {
    }
    
    
    public void persist(Object object)
    {
        // TODO:
        em.persist(object);
    }
    
    public void licencier(int id)
    {
        Landien o = em.find(Landien.class, id);
        o.setEnt(null);
    }
    
    public void modifChamp(Landien l,int id)
    {
        Landien o = em.find(Landien.class, id);
        o.setNom(l.getNom());
        
        o.setBudget(l.getBudget());
        
    }
    
    
}
